<style type="text/css">
    .ipu{width:599px;}
    .tsp{color:#888;padding-left:5px;}
    fieldset{background-color:#efefef;}
    legend{font-size:12px;font-weight:normal;color:#008800;}
</style>
<div class="bjui-pageContent">
    <form action="{:url('Domain/add')}" class="pageForm" data-toggle="validate" method="post">
        <fieldset>
            <legend>推广域名基础信息设置</legend>
            <table class="table-condensed" width="100%">
                <tr>
                    <td>
                        <label for="j_xname" class="control-label x85">推广编号：</label>
                        <input type="text" name="xname" id="j_xname" class="ipu" value="" data-rule="required" />
                        <span class="tsp">(编号如CA72,方便查找使用)</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_domain" class="control-label x85">域名名称：</label>
                        <input type="text" name="domain" id="j_domain" class="ipu" value="" data-rule="required;domain;remote[{:url('Domain/same')}]"/>
                        <span class="tsp">(如:baidu.com,无需加上"http://")</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_tdid" class="control-label x85">域名模版：</label>
                        <select name="tdid" id="j_tdid" class="dmot" data-toggle="selectpicker" data-live-search="true" data-width="599">
                            {volist name="tplArr" id="row"}
                                <option value="{$row.tdid}">{$row.tname}</option>
                            {/volist}
                        </select>
                        <span class="tsp">(打开域名时显示的页面模板)</span>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>域名绑定计划</legend>
            <table class="table-condensed" width="100%">
                <tr>
                    <td>
                        <label class="control-label x85"></label>
                        <i class="fa fa-warning"></i><span style="color:#ff2929;">启用绑定链接后域名将显示绑定的二级目录所在的链接，而不再使用本页设置的模板信息！</span>
                    </td>
                </tr>
                <tr>
                    <td style="height:35px;">
                        <label for="bind" class="control-label x85">绑定链接：</label>
                        <input type="radio" name="bind" id="j_bind_1" data-toggle="icheck" value="0" checked data-label="否&nbsp;&nbsp;">
                        <input type="radio" name="bind" id="j_bind_2" data-toggle="icheck" value="1" data-label="是">
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_tname" class="control-label x85">二级目录：</label>
                        <input class="ipu" type="text" name="tname" id="j_tname" value="" disabled/>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>域名页面信息设置</legend>
            <table class="table-condensed" width="100%">
                <tr>
                    <td>
                        <label for="j_beian" class="control-label x85">备案号码：</label>
                        <input type="text" name="beian" id="j_beian" class="ipu dmot" value="" data-rule="" />
                        <span class="tsp">{:jstips('beian')}(页面显示的备案号)</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_company" class="control-label x85">公司名称：</label>
                        <input type="text" name="company" id="j_company" class="ipu dmot" value="" data-rule="" />
                        <span class="tsp">{:jstips('company')}(页面显示的公司名称)</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_telno" class="control-label x85">联系电话：</label>
                        <input type="text" name="telno" id="j_telno" class="ipu dmot" value="" data-rule="" />
                        <span class="tsp">{:jstips('telno')}(页面显示的联系电话)</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_address" class="control-label x85">公司地址：</label>
                        <input type="text" name="address" id="j_address" class="ipu dmot" value="" data-rule="" />
                        <span class="tsp">{:jstips('address')}(页面显示的公司地址)</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label for="j_jscode" class="control-label x85">统计代码：</label>
                        <textarea name="jscode" id="j_jscode" class="dmot" cols="60" rows="4" style="resize:none;"></textarea>
                        <span class="tsp">{:jstips('jscode|raw')}(cnzz,51la等统计代码)</span>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>域名防御信息设置</legend>
            <table class="table-condensed" width="100%">
                <tr>
                    <td>
                        <label class="control-label x85"></label>
                        <i class="fa fa-warning"></i><span style="color:#ff2929;">这里的屏蔽是针对整个域名下的所有链接计划进行屏蔽，请谨慎选择</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table>
                            <tr>
                                <td><label class="control-label x85">屏蔽地区：</label></td>
                                <td style="padding: 5px 5px;">
                                    <input type="checkbox" id="j_barea" class="checkboxCtrl" data-group="baids[]" data-toggle="icheck" data-label="全部">&nbsp;<br/>
                                    {volist name="baArr" id="ba"}
                                        <div style="float:left;margin:2px 2px 0 0;padding:2px;border:1px #FF6F20 dotted;width:83px;{if ($i % 8) == 0}clear:left;{/if}">
                                            <input type="checkbox" id="j_barea{$ba.baid}" name="baids[]" data-toggle="icheck" value="{$ba.baid}" data-label="{$ba.area}">
                                        </div>
                                    {/volist}
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
        <fieldset>
            <legend>域名其他信息设置</legend>
            <table class="table-condensed" width="100%">
                <tr>
                    <td style="height:35px;">
                        <label for="" class="control-label x85">访问协议：</label>
                        <input type="radio" name="scheme" id="j_scheme_1" data-toggle="icheck" value="http" checked data-label="HTTP&nbsp;&nbsp;">
                        <input type="radio" name="scheme" id="j_scheme_2" data-toggle="icheck" value="https" data-label="HTTPS">
                        <span class="tsp">(选HTTPS,要确保该域名已经申请开通了https证书)</span>
                    </td>
                </tr>
                <tr>
                    <td style="height:35px;">
                        <label for="" class="control-label x85">禁止访问：</label>
                        <input type="radio" name="unvisit" id="j_unvisit_1" data-toggle="icheck" value="0" checked data-label="否(正常访问)&nbsp;&nbsp;">
                        <input type="radio" name="unvisit" id="j_unvisit_2" data-toggle="icheck" value="1" data-label="是(404错误页面)">
                        <span class="tsp">(用于平台更换域名时设置页面不能打开或其他原因不想让域名能打开)</span>
                    </td>
                </tr>
                <tr>
                    <td style="height:35px;">
                        <label for="" class="control-label x85">使用状况：</label>
                        <input type="radio" name="used" id="j_used_2" data-toggle="icheck" value="1" checked data-label="在用&nbsp;&nbsp;">
                        <input type="radio" name="used" id="j_used_1" data-toggle="icheck" value="0" data-label="未用">
                    </td>
                </tr>
            </table>
        </fieldset>
    </form>
</div>
<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="undo">取消</button></li>
        <li><button type="submit" class="btn-green" data-icon="save">保存</button></li>
    </ul>
</div>
<script>
    $('#j_bind_1').on('ifChecked', function(){
        $('.dmot').removeAttr('disabled');
        $('#j_tname').attr('disabled', true);
    }).on('ifUnchecked', function(){
        $('#j_tname').removeAttr('disabled');
        $('.dmot').attr('disabled', true);
    });
</script>